package com.pq.pqojcodesandbox.security;


import java.security.Permission;

/**
 * 禁用所有的安全管理器
 */
//  SecurityManager JDK17废弃了该方法
public class DenySecurityManager extends SecurityManager {

    //  检查所有的权限
    @Override
    public void checkPermission(Permission perm) {
        throw new SecurityException("权限异常:" + perm.toString());
    }
}
